/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package umis2.controladorcentral;

import java.awt.Image;
import java.io.IOException;
import java.net.URL;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.imageio.ImageIO;

/**
 * Sirve para crear
 * @author Jonatan Elias
 */
public class CreadorImagen {
    //cargar imagen

    /** Gets an image from source folder "imagenes" */
    public static Image crearImagen(String imageName) {
        try {
            URL imu;
            imu = CreadorImagen.class.getClassLoader().getResource(imageName);
            return ImageIO.read(imu);
        } catch (IOException ex) {
            Logger.getLogger(CreadorImagen.class.getName()).log(Level.SEVERE, null, ex);
            return null;
        }
    }
}
